import {
  createRouter,
  createWebHashHistory,
  type RouteRecordRaw
} from "vue-router";

// const modules: Record<string, any> = import.meta.glob("./view/**/*.vue");

const routes: RouteRecordRaw[] = [
  {
    path: "/chat",
    name: "chat",
    component: () => import("@/pages/llmlink/views/LLMChat/index.vue")
  },
  {
    path: "/doc",
    name: "doc",
    component: () => import("@/pages/llmlink/views/Doc/index.vue")
  },
  {
    path: "/setting",
    name: "setting",
    component: () => import("@/pages/llmlink/views/Settings/index.vue")
  }
];

const router = createRouter({
  history: createWebHashHistory(""),
  routes
});

router.beforeEach((to, from, next) => {
  console.log(to);
  next();
});

export default router;
